#ifndef _INPUT_
#define _INPUT_

#include <SDL.h>
#include <SDL_ttf.h>
#include <vector>
#include <string.h>

using namespace std;

class Container;

class Input {
    private:
        Container* parent;
        
        string name;
        int x;
        int y;
        int w;
        int h;
        
        SDL_Surface* SDL_render;
        SDL_Surface* texteSurface;
        
        int maxLength;
        string saisie;
        
    public:
        TTF_Font* police;
        SDL_Color couleur;
        
        Input(Container* parent, string name, int x, int y, int w, int h);
        ~Input();
        
        SDL_Surface* updateRender();
        
        void keyDown(int key);
        void mouseClick(int button, int x, int y);
        
        std::string scan(bool clear);
        
        string getName();
        int getx();
        int gety();
};

#endif